package com.wyh.mapper.appmapper;

import com.github.pagehelper.Page;
import com.wyh.domain.dto.groupfour.threemeterDTO.IntermediateThreeMeterLike;
import com.wyh.domain.po.gfour.ThreemeterReading4;
import com.wyh.domain.vo.gruopfour.threemeterVO.*;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.mapstruct.Mapper;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author : 是你
 * @since : 2024/5/21 下午4:16
 */
@Mapper
public interface ThreemeterMapper {

    Page<ThreeMeterDetailVO> threeMeter(@Param("time") LocalDate time, @Param("projectId") int projectId, @Param("status") int status, @Param("resourceIds") List<Integer> resourceIds);

    Page<ThreeMeterTotalVO> getAllThreeMeter(@Param("time") LocalDate time, @Param("status") int status, @Param("resourceIds") List<Integer> resourceIds);

    ThreeMeterDetailVO threeMeterDetail(@Param("threemeterid") Integer threemeterid, @Param("time") LocalDate time);

    int meterreading(ThreemeterReading4 threemeterReading4);

    ThreemeterReading4 getThreeMeterReading(@Param("meterid") Integer meterid,@Param("time") LocalDate time);

    int revokemeterreading(@Param("threeMeterReadingId") Integer threeMeterReadingId);

    Page<ThreeMeterDetailVO> like(IntermediateThreeMeterLike meterLike);

    ThreemeterReading4 findThreeMeterReading(@Param("threeMeterReadingId") Integer threeMeterReadingId);

    /**
     * @param id
     * @return
     */
    List<Development> getDevelopment(@Param("id") Integer id);

    List<Buildings> getBuildings(@Param("developmentId") Integer developmentId);

    List<Floor> getFloors(@Param("buildinId") Integer buildinId);

    List<Resource> getResource(@Param("layerId") Integer layerId);

    Page<ThreeMeterTotalVO> getAllThreeMeters(@Param("userid") int userid, @Param("time") LocalDateTime time, @Param("status") int status);

    String getDevelopmentName(@Param("projectId") Integer projectId);

    int updateReadingScheme(@Param("time") LocalDateTime time, @Param("developmentid") Integer developmentid);

    int revokeReadingScheme(@Param("time") LocalDateTime time, @Param("developmentid") Integer developmentid);

    int updateChargingState(@Param("chargingid") Integer chargingid, @Param("userid") Integer userid);
}
